<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib prefix="s" uri="/struts-tags" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
	<link rel="stylesheet" type="text/css" href="../scripts/ext-3.3.1/resources/css/ext-all.css"/>
	<link rel="stylesheet" type="text/css" href="../styles/global.css"/>
	<link rel="stylesheet" type="text/css" href="../styles/elements.css"/>
	<link rel="stylesheet" type="text/css" href="../scripts/jquery-ui-1.8.16/jquery-ui-1.8.16.custom.css" />
	<script type="text/javascript" src="../scripts/jquery-ui-1.8.16/jquery-1.6.2.min.js"></script>
	<script type="text/javascript" src="../scripts/jquery-ui-1.8.16/jquery-ui-1.8.16.custom.min.js"></script>
	<script type="text/javascript" src="../scripts/ext-3.3.1/adapter/ext/ext-base.js"></script>
	<script type="text/javascript" src="../scripts/ext-3.3.1/ext-all.js"></script>
	<script type="text/javascript" src="../scripts/extjs-plus.js"></script>
	<script type="text/javascript">
		Ext.onReady(function(){
			var options = {
				cm:new Ext.grid.ColumnModel([
					new Ext.grid.RowNumberer(),
					{header:"股票代码",sortable:true,dataIndex:"gpdm",renderer:function(v){
						var url = "<s:url action='profile'/>?gpdm="+v;
						var width = 850;
						var height = 400;
						return "<a onclick=showWindow('','"+url+"','"+width+"','"+height+"') href=#un>"+v.substring(2)+"</a>";
					}},
					{header:"股票名称",sortable:true,dataIndex:"gpmc"},
					{header:"股票类型",sortable:true,dataIndex:"gplx_mc"},
					{header:"所属行业",sortable:true,dataIndex:"gs_sshy_mc"},
					{header:"所属区域",sortable:true,dataIndex:"gs_qy_mc"},
					{header:"上市日期",sortable:true,dataIndex:"gs_ssrq"},
					{header:"发行价",sortable:true,dataIndex:"gs_fxjg"}
		        ]),
				record:new Ext.data.Record.create([
				    {name:"index",type:"int"},
	               	{name:"gpdm",type:"string"},
	            	{name:"gpmc",type:"string"},
	            	{name:"gplx_mc",type:"string"},
	            	{name:"gs_sshy_mc",type:"string"},
	            	{name:"gs_qy_mc",type:"string"},
	            	{name:"gs_ssrq",type:"string"},
	            	{name:"gs_fxjg",type:"string"}
				]),
	            url:"<s:url action='list_query'/>",
	            remoteSort:true
			};
			
			var grid = create_gridpanel(options);
			grid.getView().forceFit = true;
			grid.render("data");
		});
	</script>
</head>
<body>
	<div id="data"></div>
</body>
</html>